import { IConfig } from 'umi-types';
import routes from './routes';

const config: IConfig = {
  treeShaking: true,
  routes: routes,
  proxy: {
    '/api': {
      target: 'http://api.jiedata.com',
      // target: 'http://localhost:3088',
      pathRewrite: { '^/api': '' },
      changeOrigin: true,
    },
  },
  publicPath: '/',
  plugins: [
    ['umi-plugin-react', {
      antd: true,
      dva: true,
      dynamicImport: true,
      title: 'JieData后台管理系统',
      dll: false,
      locale: {
        default: 'zh-CN',
      },
      routes: {
        exclude: [
          /components\//,
        ],
      },
    }],
  ],

};

export default config;
